<template>
	<view class="main">
	<u-cell-group>
			<u-cell-item :arrow="false">
				<view slot="title">{{type=='money'?'金额':'积分'}}</view>
				<view slot="right-icon">{{parameter.amount}}</view>
			</u-cell-item>
			<u-cell-item :arrow="false">
				<view slot="title">业务类型</view>
				<view slot="right-icon">{{getBizType(parameter.bizType)}}</view>
			</u-cell-item>
			<u-cell-item :arrow="false">
				<view slot="title">资金状态</view>
				<view slot="right-icon" class="red">{{getStatus(parameter.status)}}</view>
			</u-cell-item>
			<u-cell-item :arrow="false">
				<view slot="title">资产类型</view>
				<view slot="right-icon">{{getWalletType(parameter.walletType)}}</view>
			</u-cell-item>
			<u-cell-item :arrow="false">
				<view slot="title">资产方向</view>
				<view slot="right-icon">{{parameter.direction=="IN"?"入账":"出账"}}</view>
			</u-cell-item>
			<u-cell-item :arrow="false">
				<view slot="title">时间</view>
				<view slot="right-icon">{{parameter.createTime}}</view>
			</u-cell-item>
		</u-cell-group>
	

	</view>
</template>

<script>
	import {
		httpUrl,
		imgUrl
	} from "@/common/config.js"
	export default {
		data() {
			return {
				fileList: [],
				imgUrl: imgUrl,
				action: httpUrl + 'upload/voucher',
				user_info: {
					activateFee: 0,
					activatedIntegral: 0,
					buyPoints: 0,
					level: 1,
					levelName: "普通会员",
					mhbPoints: 0,
					mhbPrice: 0,
					partnerFee: 0,
					proPoints: 0,
					rewardIntegral: 0,
					userId: "",
					userPhoto: "",
					userType:null
				},
				parameter:{
					amount:0,
					beforeAmount:0,
					bizType:"",
					createTime:"",
					direction:"",
					entryTime:"",
					id:"",
					realName:"",
					status:"",
					tradeNo:"",
					userId:"",
					userName:"",
					walletType:""
				},
				type:""
				
			};
		},
		onUnload() {

		},
		computed: {

		},
		onLoad(options) {
			console.log('111', options);
			this.user_info = uni.getStorageSync('userInfo');
		    this.parameter=JSON.parse(options.strData);
			this.type=options.type;
			console.log(this.user_info,this.parameter);
			
		},
		methods: {
			getStatus(val){
				let text="";
				if(val==0){
					text="待入账"
				}
				if(val==1){
					text="已入账"
				}
				return text;
			},
			getBizType(val){
				let text="";
				if(val==1){
					text="申请";
				}
				if(val==2){
					text="转让";
				}
				if(val==3){
					text="消费";
				}
				if(val==4){
					text="提现";
				}
				if(val==9){
					text="消费退款";
				}
				if(val==11){
					text="团队极差";
				}
				if(val==12){
					text="直推奖";
				}
				if(val==13){
					text="全网共享";
				}
				if(val==14){
					text="服务中心奖励";
				}
				return text;
			},
			getWalletType(val){
				let text="";
				if(val=="MONEY"){
					text="消费券";
				}
				if(val=="RED_INTEGRAL"){
					text="分红积分";
				}
				return text;
			}
		
		
			
			

		}
	}
</script>

<style lang="scss">
	.main {
		background-color: #F6F6F6;
		padding-top: 30rpx;
	}
.red{
	color: #E42548;
}
</style>